* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(135deg, #3b1c32, #1b1a55);
  color: #fff;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 20px;
}

.scoreboard {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 25px;
  max-width: 100%;
}

.scoreboard p,
.scoreboard label {
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin: 0;
}

#difficulty {
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid #fdbb2d;
  background: #1b1a55;
  color: #fff;
  font-weight: bold;
  outline: none;
  font-size: clamp(0.85rem, 2vw, 1rem);
  min-width: 100px;
}

#difficulty option {
  background: #1b1a55;
  color: #fff;
  font-weight: bold;
}

#start-btn,
#reset-btn {
  padding: 8px 16px;
  background: #fdbb2d;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
  font-size: clamp(0.85rem, 2vw, 1rem);
  white-space: nowrap;
}

#start-btn:hover:not(:disabled),
#reset-btn:hover:not(:disabled) {
  transform: scale(1.05);
  background: #ffc94d;
}

#start-btn:disabled,
#reset-btn:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.6;
}

#reset-btn {
  background: #e74c3c;
}

#reset-btn:hover:not(:disabled) {
  background: #c0392b;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 120px));
  grid-gap: clamp(10px, 2vw, 15px);
  justify-content: center;
  max-width: 100%;
  padding: 0 10px;
}

.hole {
  width: 100%;
  aspect-ratio: 1;
  max-width: 120px;
  background: #333;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.5);
}

.mole {
  width: 70%;
  height: 70%;
  background: url("https://cdn-icons-png.flaticon.com/512/616/616408.png")
    no-repeat center/contain;
  position: absolute;
  bottom: -70%;
  left: 50%;
  transform: translateX(-50%);
  animation: pop 0.9s ease-out forwards;
  cursor: pointer;
  touch-action: manipulation;
}

@keyframes pop {
  0% {
    bottom: -70%;
  }
  50% {
    bottom: 10%;
  }
  100% {
    bottom: -70%;
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .scoreboard {
    gap: 0.6rem;
    margin-bottom: 20px;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(70px, 100px));
    grid-gap: 10px;
  }

  #start-btn,
  #reset-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .scoreboard {
    gap: 0.5rem;
    margin-bottom: 15px;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(60px, 80px));
    grid-gap: 8px;
  }

  #start-btn,
  #reset-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  #difficulty {
    font-size: 0.85rem;
    padding: 5px 8px;
  }
}

@media (max-width: 360px) {
  .grid {
    grid-template-columns: repeat(3, 55px);
    grid-gap: 6px;
  }

  h1 {
    font-size: 1.3rem;
  }
}
